import { IFeidaoAiBrowserComponent, IFeidaoAiNodejsComponent } from '@feidao/web/interfaces';
import get_lang from '../../atom-web/base-get-lang';
import en from './en';
import zh from './zh';

const langs = {
	en, zh
};

export default function get_i18n(fd: IFeidaoAiBrowserComponent | IFeidaoAiNodejsComponent | any) {
	const lang = get_lang((fd.data && fd.data.params) || fd);
	return langs[lang] as { [no: string]: string; };
}
